Optimal. Leaf size=90 \[ \frac{a (c+d x)^4}{4 d}+\frac{6 b d^2 (c+d x) \cos (e+f x)}{f^3}+\frac{3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{b (c+d x)^3 \cos (e+f x)}{f}-\frac{6 b d^3 \sin (e+f x)}{f^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.122539, antiderivative size = 90, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3317, 3296, 2637} \[ \frac{a (c+d x)^4}{4 d}+\frac{6 b d^2 (c+d x) \cos (e+f x)}{f^3}+\frac{3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{b (c+d x)^3 \cos (e+f x)}{f}-\frac{6 b d^3 \sin (e+f x)}{f^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3317
Rule 3296
Rule 2637
Rubi steps
\begin{align*} \int (c+d x)^3 (a+b \sin (e+f x)) \, dx &=\int \left (a (c+d x)^3+b (c+d x)^3 \sin (e+f x)\right ) \, dx\\ &=\frac{a (c+d x)^4}{4 d}+b \int (c+d x)^3 \sin (e+f x) \, dx\\ &=\frac{a (c+d x)^4}{4 d}-\frac{b (c+d x)^3 \cos (e+f x)}{f}+\frac{(3 b d) \int (c+d x)^2 \cos (e+f x) \, dx}{f}\\ &=\frac{a (c+d x)^4}{4 d}-\frac{b (c+d x)^3 \cos (e+f x)}{f}+\frac{3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{\left (6 b d^2\right ) \int (c+d x) \sin (e+f x) \, dx}{f^2}\\ &=\frac{a (c+d x)^4}{4 d}+\frac{6 b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac{b (c+d x)^3 \cos (e+f x)}{f}+\frac{3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{\left (6 b d^3\right ) \int \cos (e+f x) \, dx}{f^3}\\ &=\frac{a (c+d x)^4}{4 d}+\frac{6 b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac{b (c+d x)^3 \cos (e+f x)}{f}-\frac{6 b d^3 \sin (e+f x)}{f^4}+\frac{3 b d (c+d x)^2 \sin (e+f x)}{f^2}\\ \end{align*}
Mathematica [A] time = 0.432017, size = 124, normalized size = 1.38 \[ \frac{1}{4} a x \left (6 c^2 d x+4 c^3+4 c d^2 x^2+d^3 x^3\right )+\frac{3 b d \left (c^2 f^2+2 c d f^2 x+d^2 \left (f^2 x^2-2\right )\right ) \sin (e+f x)}{f^4}-\frac{b (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (f^2 x^2-6\right )\right ) \cos (e+f x)}{f^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.011, size = 482, normalized size = 5.4 \begin{align*}{\frac{1}{f} \left ({\frac{a{d}^{3} \left ( fx+e \right ) ^{4}}{4\,{f}^{3}}}+{\frac{ac{d}^{2} \left ( fx+e \right ) ^{3}}{{f}^{2}}}-{\frac{a{d}^{3}e \left ( fx+e \right ) ^{3}}{{f}^{3}}}+{\frac{3\,a{c}^{2}d \left ( fx+e \right ) ^{2}}{2\,f}}-3\,{\frac{ac{d}^{2}e \left ( fx+e \right ) ^{2}}{{f}^{2}}}+{\frac{3\,a{d}^{3}{e}^{2} \left ( fx+e \right ) ^{2}}{2\,{f}^{3}}}+a{c}^{3} \left ( fx+e \right ) -3\,{\frac{a{c}^{2}de \left ( fx+e \right ) }{f}}+3\,{\frac{ac{d}^{2}{e}^{2} \left ( fx+e \right ) }{{f}^{2}}}-{\frac{a{d}^{3}{e}^{3} \left ( fx+e \right ) }{{f}^{3}}}+{\frac{b{d}^{3} \left ( - \left ( fx+e \right ) ^{3}\cos \left ( fx+e \right ) +3\, \left ( fx+e \right ) ^{2}\sin \left ( fx+e \right ) -6\,\sin \left ( fx+e \right ) +6\, \left ( fx+e \right ) \cos \left ( fx+e \right ) \right ) }{{f}^{3}}}+3\,{\frac{cb{d}^{2} \left ( - \left ( fx+e \right ) ^{2}\cos \left ( fx+e \right ) +2\,\cos \left ( fx+e \right ) +2\, \left ( fx+e \right ) \sin \left ( fx+e \right ) \right ) }{{f}^{2}}}-3\,{\frac{b{d}^{3}e \left ( - \left ( fx+e \right ) ^{2}\cos \left ( fx+e \right ) +2\,\cos \left ( fx+e \right ) +2\, \left ( fx+e \right ) \sin \left ( fx+e \right ) \right ) }{{f}^{3}}}+3\,{\frac{{c}^{2}bd \left ( \sin \left ( fx+e \right ) - \left ( fx+e \right ) \cos \left ( fx+e \right ) \right ) }{f}}-6\,{\frac{cb{d}^{2}e \left ( \sin \left ( fx+e \right ) - \left ( fx+e \right ) \cos \left ( fx+e \right ) \right ) }{{f}^{2}}}+3\,{\frac{b{d}^{3}{e}^{2} \left ( \sin \left ( fx+e \right ) - \left ( fx+e \right ) \cos \left ( fx+e \right ) \right ) }{{f}^{3}}}-{c}^{3}b\cos \left ( fx+e \right ) +3\,{\frac{{c}^{2}bde\cos \left ( fx+e \right ) }{f}}-3\,{\frac{cb{d}^{2}{e}^{2}\cos \left ( fx+e \right ) }{{f}^{2}}}+{\frac{b{d}^{3}{e}^{3}\cos \left ( fx+e \right ) }{{f}^{3}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.05, size = 624, normalized size = 6.93 \begin{align*} \frac{4 \,{\left (f x + e\right )} a c^{3} + \frac{{\left (f x + e\right )}^{4} a d^{3}}{f^{3}} - \frac{4 \,{\left (f x + e\right )}^{3} a d^{3} e}{f^{3}} + \frac{6 \,{\left (f x + e\right )}^{2} a d^{3} e^{2}}{f^{3}} - \frac{4 \,{\left (f x + e\right )} a d^{3} e^{3}}{f^{3}} + \frac{4 \,{\left (f x + e\right )}^{3} a c d^{2}}{f^{2}} - \frac{12 \,{\left (f x + e\right )}^{2} a c d^{2} e}{f^{2}} + \frac{12 \,{\left (f x + e\right )} a c d^{2} e^{2}}{f^{2}} + \frac{6 \,{\left (f x + e\right )}^{2} a c^{2} d}{f} - \frac{12 \,{\left (f x + e\right )} a c^{2} d e}{f} - 4 \, b c^{3} \cos \left (f x + e\right ) + \frac{4 \, b d^{3} e^{3} \cos \left (f x + e\right )}{f^{3}} - \frac{12 \, b c d^{2} e^{2} \cos \left (f x + e\right )}{f^{2}} + \frac{12 \, b c^{2} d e \cos \left (f x + e\right )}{f} - \frac{12 \,{\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b d^{3} e^{2}}{f^{3}} + \frac{24 \,{\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b c d^{2} e}{f^{2}} - \frac{12 \,{\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b c^{2} d}{f} + \frac{12 \,{\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \,{\left (f x + e\right )} \sin \left (f x + e\right )\right )} b d^{3} e}{f^{3}} - \frac{12 \,{\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \,{\left (f x + e\right )} \sin \left (f x + e\right )\right )} b c d^{2}}{f^{2}} - \frac{4 \,{\left ({\left ({\left (f x + e\right )}^{3} - 6 \, f x - 6 \, e\right )} \cos \left (f x + e\right ) - 3 \,{\left ({\left (f x + e\right )}^{2} - 2\right )} \sin \left (f x + e\right )\right )} b d^{3}}{f^{3}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.69688, size = 362, normalized size = 4.02 \begin{align*} \frac{a d^{3} f^{4} x^{4} + 4 \, a c d^{2} f^{4} x^{3} + 6 \, a c^{2} d f^{4} x^{2} + 4 \, a c^{3} f^{4} x - 4 \,{\left (b d^{3} f^{3} x^{3} + 3 \, b c d^{2} f^{3} x^{2} + b c^{3} f^{3} - 6 \, b c d^{2} f + 3 \,{\left (b c^{2} d f^{3} - 2 \, b d^{3} f\right )} x\right )} \cos \left (f x + e\right ) + 12 \,{\left (b d^{3} f^{2} x^{2} + 2 \, b c d^{2} f^{2} x + b c^{2} d f^{2} - 2 \, b d^{3}\right )} \sin \left (f x + e\right )}{4 \, f^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.75372, size = 264, normalized size = 2.93 \begin{align*} \begin{cases} a c^{3} x + \frac{3 a c^{2} d x^{2}}{2} + a c d^{2} x^{3} + \frac{a d^{3} x^{4}}{4} - \frac{b c^{3} \cos{\left (e + f x \right )}}{f} - \frac{3 b c^{2} d x \cos{\left (e + f x \right )}}{f} + \frac{3 b c^{2} d \sin{\left (e + f x \right )}}{f^{2}} - \frac{3 b c d^{2} x^{2} \cos{\left (e + f x \right )}}{f} + \frac{6 b c d^{2} x \sin{\left (e + f x \right )}}{f^{2}} + \frac{6 b c d^{2} \cos{\left (e + f x \right )}}{f^{3}} - \frac{b d^{3} x^{3} \cos{\left (e + f x \right )}}{f} + \frac{3 b d^{3} x^{2} \sin{\left (e + f x \right )}}{f^{2}} + \frac{6 b d^{3} x \cos{\left (e + f x \right )}}{f^{3}} - \frac{6 b d^{3} \sin{\left (e + f x \right )}}{f^{4}} & \text{for}\: f \neq 0 \\\left (a + b \sin{\left (e \right )}\right ) \left (c^{3} x + \frac{3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac{d^{3} x^{4}}{4}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.46284, size = 212, normalized size = 2.36 \begin{align*} \frac{1}{4} \, a d^{3} x^{4} + a c d^{2} x^{3} + \frac{3}{2} \, a c^{2} d x^{2} + a c^{3} x - \frac{{\left (b d^{3} f^{3} x^{3} + 3 \, b c d^{2} f^{3} x^{2} + 3 \, b c^{2} d f^{3} x + b c^{3} f^{3} - 6 \, b d^{3} f x - 6 \, b c d^{2} f\right )} \cos \left (f x + e\right )}{f^{4}} + \frac{3 \,{\left (b d^{3} f^{2} x^{2} + 2 \, b c d^{2} f^{2} x + b c^{2} d f^{2} - 2 \, b d^{3}\right )} \sin \left (f x + e\right )}{f^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]